import {
  createStore
} from 'vuex'
import createPersistedstate from 'vuex-persistedstate'

export default createStore({
  // 存储账户信息
  state: {
    user: [{job:null}]
  },

  // 用于变更store中的值
  mutations: {
    add(state, users) {
      state.user = users
    },
  },
  plugins: [createPersistedstate({
    storage:window.sessionStorage
  })]
})